﻿<phone:PhoneApplicationPage 
    x:Class="SMSAssistant.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
    xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="800" 
    d:DataContext="{d:DesignData SampleData/MainViewModelSampleData.xaml}"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="Black" Background="White"
    SupportedOrientations="Portrait"     Orientation="Portrait"
    shell:SystemTray.IsVisible="False">
    <phone:PhoneApplicationPage.Resources>
        
    </phone:PhoneApplicationPage.Resources>
        <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="White" >
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <Grid Margin="2,20,20,20">
            <TextBox x:Name="searchBox" GotFocus="TextBox_GotFocus"  FontSize="28" Padding="10,4" BorderThickness="0,1" Background="LightGray" Foreground="gray" />
            <Button Click="ButtonSearch_Click" x:Name="btnSearch" HorizontalAlignment="Right" BorderThickness="0" Padding="0" Background="{StaticResource PhoneAccentBrush}" >
                <Image Height="46" Source="/Images/AppBarIcons/appbar.search.rest.png" />
            </Button>
            <!--<Rectangle Width="12" Margin="0,12" HorizontalAlignment="Left" Fill="{StaticResource PhoneAccentBrush}" />-->
        </Grid>
        <!--Pivot Control-->
        <ListBox SelectionChanged="messageList_SelectionChanged" Grid.Row="1" Foreground="Black" x:Name="messageList" Margin="0,0,-12,0" ItemsSource="{Binding Items}">
            <ListBox.ItemTemplate>
                <DataTemplate>
                    <Grid Margin="10,0,0,17" Width="432" Height="88" >
                        <toolkit:ContextMenuService.ContextMenu>
                            <toolkit:ContextMenu x:Name="cMenu" Opened="cMenu_Opened">

                            </toolkit:ContextMenu>
                        </toolkit:ContextMenuService.ContextMenu>
                        <Grid.RowDefinitions>
                            <RowDefinition/>
                            <RowDefinition Height="AUTO"/>
                        </Grid.RowDefinitions>
                        <TextBlock Foreground="Black"  Margin="10,0,50,0"  Text="{Binding LineOne}" TextWrapping="NoWrap" Style="{StaticResource PhoneTextExtraLargeStyle}"/>
                        <TextBlock Grid.Row="1" VerticalAlignment="Bottom" Foreground="Gray" TextTrimming="None" Text="{Binding LineTwo}" FontSize="24" Margin="14,0,50,-6" Style="{StaticResource PhoneTextNormalStyle}"/>
                        <Rectangle Grid.RowSpan="2" Width="10" Margin="-10,12,0,-2" HorizontalAlignment="Left" Fill="{StaticResource PhoneAccentBrush}" />
                        <TextBlock Foreground="Black" Margin="0,0,-20,8" Text="{Binding TimeToDisplay}" VerticalAlignment="Bottom" HorizontalAlignment="Right"/>
                    </Grid>
                </DataTemplate>
            </ListBox.ItemTemplate>
        </ListBox>
    </Grid>

    <!--Sample code showing usage of ApplicationBar-->
    <!--<phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" Opacity=".5" IsMenuEnabled="True">
            <shell:ApplicationBarIconButton IconUri="/Images/AppBarIcons/appbar.add.rest.png" Click="ApplicationBarIconButton_Click" Text="New"/>
            <shell:ApplicationBarIconButton IconUri="/Images/appbar_button2.png" Text="Button 2"/>
            <shell:ApplicationBar.MenuItems>
                <shell:ApplicationBarMenuItem Text="添加快捷方式" Click="ApplicationBarMenuItem_Click"/>
            </shell:ApplicationBar.MenuItems>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>-->

</phone:PhoneApplicationPage>